import React,{Suspense,lazy} from 'react'
import { BrowserRouter as Router, Route, Routes, useNavigate, useLocation } from 'react-router-dom'
let Search=lazy(()=>import('./views/Search/Search'))
let Index=lazy(()=>import('./views/Index/Index'))
export default function App() {
  return (
    <div>
      <Suspense fallback={<div style={{textAlign:'center'}}>Loading....</div>}>
          <Routes>
            <Route path='/' element={<Index></Index>} exact></Route>
            <Route path='/search' element={<Search></Search>}></Route>
          </Routes>
      </Suspense>
    </div>
  )
}
